package com.econ.powercloud.ems.dal.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @author chenxiaoqi
 * @since 2020/08/06
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class AuthUser extends Model {

    private static final long serialVersionUID = 1596698366658L;
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 姓名
     */
    @TableField(value = "name")
    private String name;
    /**
     * 昵称
     */
    @TableField(value = "nickname")
    private String nickname;

    /**
     * 用户编号
     */
    @TableField(value = "no")
    private String no;

    /**
     * 性别
     */
    @TableField(value = "sex")
    private String sex;

    /**
     * 手机号码
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * logoUrl
     */
    @TableField(value = "logo_url")
    private String logoUrl;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    private String email;

    /**
     * 账号
     */
    @TableField(value = "account")
    private String account;

    /**
     * 密码
     */
    @TableField(value = "password")
    private String password;

    /**
     * 盐
     */
    @TableField(value = "salt")
    private String salt;

    /**
     * 公司id
     */
    @TableField(value = "company_id")
    private String companyId;

    /**
     * 紧急联系人
     */
    @TableField(value = "emergency_contact")
    private String emergencyContact;

    /**
     * 紧急联系人电话
     */
    @TableField(value = "emergency_contact_phone")
    private String emergencyContactPhone;

    /**
     * 1启用 0停用
     */
    @TableField(value = "valid")
    private Integer valid;

    /**
     * 头像url
     */
    @TableField(value = "photo")
    private String photo;

    /**
     * 纬度
     */
    @TableField(value = "latitude")
    private Double latitude;

    /**
     * 经度
     */
    @TableField(value = "longitude")
    private Double longitude;

    /**
     * 手机唯一标识
     */
    @TableField(value = "phone_code")
    private String phoneCode;

    /**
     * JPush标识手机设备的ID
     */
    @TableField(value = "registration_id")
    private String registrationId;

    /**
     * 是否修改过密码:0->未修改,1->已修改
     */
    @TableField(value = "pwd_has_modify")
    private Integer pwdHasModify;

    /**
     * 省份名称
     */
    @TableField(value = "province")
    private String province;

    /**
     * 城市名称
     */
    @TableField(value = "city")
    private String city;

    /**
     * 权限等级 - 有设置权限等级 等授权给用户时不能大于用户的权限等级
     */
    @TableField(value = "auth_level")
    private Integer authLevel;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Long createTime;

    /**
     * 创建人
     */
    @TableField(value = "creator")
    private String creator;

    /**
     * 信息更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Long updateTime;

    @TableField(fill = FieldFill.INSERT)
    @TableLogic(value = "0", delval = "1")
    private Integer deleteFlag;

    /**
     * 角色id
     */
    @TableField(value = "role_id")
    private Long roleId;

}
